package com.autumn.scheduler.job.trigger;

import org.quartz.DateBuilder.IntervalUnit;

import com.autumn.util.ExceptionUtils;

/**
 * 时间间隔作业触发器 描述：
 * 
 * @author 杨昌国 2018-03-20 18:41:52
 */
public abstract class AbstractIntervalJobTrigger extends AbstractJobTrigger {

	/**
	 * 
	 */
	private final int timeInterval;
	private final IntervalUnit unit;

	/**
	 * 
	 * @param timeInterval
	 * @param unit
	 */
	public AbstractIntervalJobTrigger(int timeInterval, IntervalUnit unit) {
		ExceptionUtils.checkNotNull(unit, "unit");
		this.timeInterval = timeInterval;
		this.unit = unit;
	}

	public int getTimeInterval() {
		return timeInterval;
	}

	public IntervalUnit getUnit() {
		return unit;
	}
}
